package com.atguigu.order.feign.fallback;

import com.atguigu.order.feign.OrderFeignClient;
import com.atguigu.product.bean.Product;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
@Component
public class ProductFeignClientFallback implements OrderFeignClient {
    @Override
    public Product getProductById(Long productId) {
        Product product = new Product();
        product.setId(productId);
        product.setPrice(new BigDecimal(0));
        product.setProductName("未知商品");
        product.setNum(0);
        return product;
    }
}
